<template>
	<view class="checkInfo">
		<u-navbar title="核查详情" back-icon-color="#fff"
			:background="{backgroundImage: 'linear-gradient(45deg, #68dae7, #21a4b3)'}" title-color="#FFFFFF">
		</u-navbar>
		<u-cell-group>
			<u-cell-item icon="" title="仪器名称" :value="checkInfo.deviceName" :arrow="false"></u-cell-item>
			<u-cell-item icon="" title="核查人" :value="checkInfo.checkBy?checkInfo.checkBy:''" :arrow="false"></u-cell-item>
			<u-cell-item icon="" title="核查时间" :value="checkInfo.checkTime?checkInfo.checkTime:''" :arrow="false"></u-cell-item>
			</u-cell-group>
		</u-cell-group>
		<view class="checkInfo-list">
			<view class="checkInfo-list-item">核查过程:{{checkInfo.checkRecord?checkInfo.checkRecord:""}}</view>
		</view>
		<view class="checkInfo-list" style="padding-top: 0;">
			<view class="checkInfo-list-title">核查报告:</view>
			<image class="checkInfoPng" mode="widthFix" @click="previewImage(checkInfo.checkPic)" :src="checkInfo.checkPic"></image>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				checkInfo: {},
				url:[]
			}
		},
		onLoad(options) {
			this.id = options.id
			this.getData()
		},
		methods:{
			getData(){
				let params = {
					id:this.id
				}
				this.$xt.api.checkDetail(params).then(res=>{
					this.checkInfo = res.data
					if(this.checkInfo.checkPic) this.url.push(this.checkInfo.checkPic)
				})
			},
			previewImage(url){
				uni.previewImage({
					current: url,
					urls:this.url
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.checkInfo{
		&-list{
			background-color: #fff;
			padding: 13px 32rpx;
			color:#585858;
			&-item{
				// padding-left: 24rpx;
				margin-top: 12rpx;
			}
		}
		.checkInfoPng{
			width: 30%;
			// height: 300rpx;
		}
	}
</style>